aboutsummaryrefslogtreecommitdiff
path: root/pages/api/consumet/episode/[id].js
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-08-12 22:54:26 +0700
committerGitHub <[email protected]>2023-08-12 22:54:26 +0700
commit3e78826658c7d2a4e9b3c1d73e63dacc1d39c361 (patch)
treed580d03670692c6c5d361ec8559e7a2352354f3a /pages/api/consumet/episode/[id].js
parentUpdate v3.9.1 - Merged Beta to Main (#44) (diff)
downloadmoopa-3.9.3.tar.xz
moopa-3.9.3.zip
Update v3.9.3 - Merged Beta to Main (#51)v3.9.3
* commit * update db * Update v3.9.1-beta-v3.1 * Update v3.9.1 * Fix watched progress not showing * Secure headers * Fix recently watched image * Update v3.9.2 > Added custom lists for AniList > Fixed episode listMode progress * Update db route * Fixed AniList * Fix next button on dub anime > video is playing sub anime instead dub * small adjusment for premid * fix eslint * small updates > added ability to remove episode from recently watched * Update v3.9.3
Diffstat (limited to 'pages/api/consumet/episode/[id].js')
-rw-r--r--pages/api/consumet/episode/[id].js5
1 files changed, 2 insertions, 3 deletions
diff --git a/pages/api/consumet/episode/[id].js b/pages/api/consumet/episode/[id].js
index e6f40ce..6e7f318 100644
--- a/pages/api/consumet/episode/[id].js
+++ b/pages/api/consumet/episode/[id].js
@@ -1,4 +1,3 @@
-import axios from "axios";
import cacheData from "memory-cache";
const API_URL = process.env.API_URI;
@@ -9,7 +8,7 @@ export default async function handler(req, res) {
const dub = req.query.dub || false;
const refresh = req.query.refresh || false;
- const providers = ["enime", "gogoanime"];
+ const providers = ["enime", "gogoanime", "zoro"];
const datas = [];
const cached = cacheData.get(id + dub);
@@ -59,7 +58,7 @@ export default async function handler(req, res) {
if (datas.length === 0) {
return res.status(404).json({ message: "Anime not found" });
} else {
- cacheData.put(id + dub, { data: datas }, 1000 * 60 * 60 * 10);
+ cacheData.put(id + dub, { data: datas }, 1000 * 60 * 60 * 10);
res.status(200).json({ data: datas });
}
}